package ping.pay.me.activity;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TabHost;
import android.widget.TextView;
import ping.pay.me.R;

/**
 * Created by install on 14/12/14.
 */
public class HomePageActivity extends TabActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home_page_activity);

        TabHost tbHost = getTabHost();
        TabHost.TabSpec goodsListTb = tbHost.newTabSpec("tab01");
        TabHost.TabSpec userCenterTb = tbHost.newTabSpec("tab02");

        Intent styleListIntent = new Intent(HomePageActivity.this,StyleListActivity.class);
        Intent userCenterIntent = new Intent(HomePageActivity.this,UserCenterActivity.class);

        View tabGoodsCenter = LayoutInflater.from(this).inflate(R.layout.home_page_goods_center_tab,getTabWidget(),false);
        View tabUserCenter = LayoutInflater.from(this).inflate(R.layout.home_page_user_center_tab,getTabWidget(),false);

        goodsListTb.setIndicator(tabGoodsCenter).setContent(styleListIntent);
        userCenterTb.setIndicator(tabUserCenter).setContent(userCenterIntent);

        tbHost.addTab(goodsListTb);
        tbHost.addTab(userCenterTb);

    }
}